import {
  Body, Controller, Post,
  // Req
} from '@nestjs/common';
import { ApiOkResponse, ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { ADMIN_PREFIX } from '../../admin.constants';
import { ReportFormMachineProductionStatisticsService } from './machineProductionStatistics.service';

@ApiSecurity(ADMIN_PREFIX)
@ApiTags('设备产量统计模块')
@Controller('machineProductionStatistics')
export class ReportFormMachineProductionStatisticsController {
  constructor(
    private machineProductionStatisticsService: ReportFormMachineProductionStatisticsService
  ) {}

  @ApiOperation({ summary: '获取设备产量统计列表' })
  @ApiOkResponse()
  @Post('list')
  async list(@Body() dto) {
    return await this.machineProductionStatisticsService.list(dto);
  }
}
